package cn.xopencode.score.api.enums.safety;

import cn.xopencode.common.framework.core.DoubleArrayValuable;

import java.util.Arrays;

/**
 * 技能比武名次分数枚举
 */
public enum RankingScoreEnum implements DoubleArrayValuable {
    //1:公司第一名,2:公司第二名,3:公司第三名,4:通报表扬
    FIRST(5.0, 1),
    SECOND(3.0, 2),
    THIRD(2.0,3),
    PRAISE(1.0,4);

    public static final double[] ARRAYS = Arrays.stream(values()).mapToDouble(RankingScoreEnum::getScore).toArray();

    /**
     *  级别
     */
    private final Double score;
    /**
     * 描述
     */
    private final Integer ranking;

    RankingScoreEnum(Double score, Integer ranking) {
        this.score = score;
        this.ranking = ranking;
    }

    public Double getScore() {
        return score;
    }

    public Integer getRanking() {
        return ranking;
    }

    @Override
    public double[] array() {
        return ARRAYS;
    }

}
